package com.ht.medicaltreatment.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.bean.ConsumableLeftListBean

class ConsumableLeftLeftAdapter :
    BaseQuickAdapter<ConsumableLeftListBean.DataBean, BaseViewHolder>(R.layout.item_left_adapter) {
    override fun convert(holder: BaseViewHolder, item: ConsumableLeftListBean.DataBean) {
        holder.setText(R.id.tvName,item.desc)
        if(item.isChecked){
            holder.setBackgroundColor(R.id.tvName,context.getColor(R.color.colora9))
        }else{
            holder.setBackgroundColor(R.id.tvName,context.getColor(R.color.colorTextGray))
        }
    }
}
